<script setup lang="ts">

import {Evaluationrecord} from "@/http/Personal center";
import {ref} from "vue";
import {useCounterStore} from "@/stores/SaveUser";

const onClickLeft = () => history.back();
const pinan = useCounterStore()
const list = useCounterStore()
const listes = list.userInfo.id
const data = ref({
    pageSize: 10000,
    pageNum: 1,
    studentId: listes
})
const listone = ref({})
Evaluationrecord(data.value).then(res => {
    // console.log(res)
    // console.log(res.rows)
    listone.value = res.rows
})

function Content(item) {
    pinan.Score.score = item.score
    // console.log(pinan.Score)
}
</script>

<template>
    <div>
        <div>
            <van-nav-bar
                    title="标题"
                    left-text="返回"
                    left-arrow
                    @click-left="onClickLeft"
            />
            <router-link to="/cepingjieguo">
                <van-cell-group v-for="item in listone" :key="item.id">
                    <van-cell :title="item.psyAssessment.name" :value="item.score+`分`" :label="item.createTime"
                              :center="true" @click="Content(item)" inset/>
                </van-cell-group>
            </router-link>
        </div>
    </div>
</template>

<style scoped lang="less">
:deep(.van-cell-group) {
  margin: 10px;

  :deep(.van-cell__value) {
    font-size: 16px;
  }
}
</style>